|
gnss22 2.2.0
|
API for configuring and manipulating GNSS 22 Click driver. More...
Topics | |
| GNSS 22 Settings | |
| Settings of GNSS 22 Click driver. | |
| GNSS 22 MikroBUS Map | |
| MikroBUS pin mapping of GNSS 22 Click driver. | |
Functions | |
| void | gnss22_cfg_setup (gnss22_cfg_t *cfg) |
| GNSS 22 configuration object setup function. | |
| void | gnss22_drv_interface_sel (gnss22_cfg_t *cfg, gnss22_drv_t drv_sel) |
| GNSS 22 driver interface setup function. | |
| err_t | gnss22_init (gnss22_t *ctx, gnss22_cfg_t *cfg) |
| GNSS 22 initialization function. | |
| err_t | gnss22_generic_write (gnss22_t *ctx, uint8_t *data_in, uint16_t len) |
| GNSS 22 data writing function. | |
| err_t | gnss22_generic_read (gnss22_t *ctx, uint8_t *data_out, uint16_t len) |
| GNSS 22 data reading function. | |
| uint8_t | gnss22_get_pps_pin (gnss22_t *ctx) |
| GNSS 22 get PPS pin function. | |
| uint8_t | gnss22_get_fix_pin (gnss22_t *ctx) |
| GNSS 22 get FIX pin function. | |
| void | gnss22_set_rst_pin (gnss22_t *ctx, uint8_t state) |
| GNSS 22 set RST pin function. | |
| void | gnss22_set_stb_pin (gnss22_t *ctx, uint8_t state) |
| GNSS 22 set STB pin function. | |
| void | gnss22_set_fon_pin (gnss22_t *ctx, uint8_t state) |
| GNSS 22 set FON pin function. | |
| void | gnss22_reset_device (gnss22_t *ctx) |
| GNSS 22 reset device function. | |
| err_t | gnss22_parse_gga (uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data) |
| GNSS 22 parse GGA function. | |
API for configuring and manipulating GNSS 22 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void gnss22_cfg_setup | ( | gnss22_cfg_t * | cfg | ) |
GNSS 22 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See gnss22_cfg_t object definition for detailed explanation. |
| void gnss22_drv_interface_sel | ( | gnss22_cfg_t * | cfg, |
| gnss22_drv_t | drv_sel ) |
GNSS 22 driver interface setup function.
This function sets a serial driver interface which will be used further in the Click driver.
| [out] | cfg | : Click configuration structure. See gnss22_cfg_t object definition for detailed explanation. |
| [in] | drv_sel | : Driver interface selection. See gnss22_drv_t object definition for detailed explanation. |
| err_t gnss22_generic_read | ( | gnss22_t * | ctx, |
| uint8_t * | data_out, | ||
| uint16_t | len ) |
GNSS 22 data reading function.
This function reads a desired number of data bytes by using the selected serial interface.
| [in] | ctx | : Click context object. See gnss22_t object definition for detailed explanation. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
>0 - Number of data bytes read, <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation. | err_t gnss22_generic_write | ( | gnss22_t * | ctx, |
| uint8_t * | data_in, | ||
| uint16_t | len ) |
GNSS 22 data writing function.
This function writes a desired number of data bytes by using the selected serial interface.
| [in] | ctx | : Click context object. See gnss22_t object definition for detailed explanation. |
| [in] | data_in | : Data buffer for sending. |
| [in] | len | : Number of bytes for sending. |
>=0 - Success, <0 - Error. See #err_t definition for detailed explanation. | uint8_t gnss22_get_fix_pin | ( | gnss22_t * | ctx | ) |
GNSS 22 get FIX pin function.
This function returns the 3D fix indication (FIX) pin logic state.
| [in] | ctx | : Click context object. See gnss22_t object definition for detailed explanation. |
| uint8_t gnss22_get_pps_pin | ( | gnss22_t * | ctx | ) |
GNSS 22 get PPS pin function.
This function returns the pulse per second (PPS) pin logic state.
| [in] | ctx | : Click context object. See gnss22_t object definition for detailed explanation. |
| err_t gnss22_init | ( | gnss22_t * | ctx, |
| gnss22_cfg_t * | cfg ) |
GNSS 22 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See gnss22_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See gnss22_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t gnss22_parse_gga | ( | uint8_t * | rsp_buf, |
| uint8_t | gga_element, | ||
| uint8_t * | element_data ) |
GNSS 22 parse GGA function.
This function parses the GGA data from the read response buffer.
| [in] | rsp_buf | : Response buffer. |
| [in] | gga_element | : GGA element position [1-14]. |
| [out] | element_data | : Element data parsed. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void gnss22_reset_device | ( | gnss22_t * | ctx | ) |
GNSS 22 reset device function.
This function resets the device by toggling the RST, STB, and FON pins.
| [in] | ctx | : Click context object. See gnss22_t object definition for detailed explanation. |
| void gnss22_set_fon_pin | ( | gnss22_t * | ctx, |
| uint8_t | state ) |
GNSS 22 set FON pin function.
This function sets the force enable (FON) pin logic state.
| [in] | ctx | : Click context object. See gnss22_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |
| void gnss22_set_rst_pin | ( | gnss22_t * | ctx, |
| uint8_t | state ) |
GNSS 22 set RST pin function.
This function sets the RST pin logic state.
| [in] | ctx | : Click context object. See gnss22_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |